<?php
/**
 * Akimimi front
 * ErrorMessageView.php
 * by M.Wang
 */

require_once '../app/views/BaseView.php';
require_once "../". $GLOBALS["local"] ."/"."error.php";
class ErrorMessageView extends BaseView {

    public function getPage($str_message = null){
        $arr_navsetting = array(
            array('text'=>ERRORMESSAGETITLE)
        );
        $this->setPageTitle(ERRORMESSAGETITLE);
        $this->addCSS('myaccount.css');
        $this->addCSS('myaccountleftnav.css');
        $header = '';
        require_once '../app/views/MyAccoutLeftNavView.php';
        $myAccountLeftNavView = new MyAccountLeftNav();
        $str_result = $header
                    . $this->getNavigation($arr_navsetting)
                    . "<div id='mymimi_body'>"
                    . $myAccountLeftNavView->getMyAccountLeftNav()
                    . $this->getContent($str_message)
                    . '</div>';
        return $this->getHtmlPage($str_result);
    }

    public function getContent($str_message){
        if(defined($str_message))
            $str_message = constant($str_message);
        $str_errorTitle = ERRORMESSAGETITLE;
        $str_back = GOBACKHREF;
        $str_index = INDEXHERF;
        $str_result =
<<<str_result
    <div id='mymimi_right'>
        <div class='right_bj'></div>
        <div>
            <fieldset style='margin:auto;margin-top:60px;width:60%;'>
                <legend>{$str_errorTitle}</legend>
                <div style='width:90%;margin:auto;margin-top:20px;'>
                      {$str_message}<br /><br />
                      <a href='javascript:history.go(-1);'>{$str_back}</a>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      <a href='/'>{$str_index}</a>
                </div>
            </fieldset>
        </div>
    </div>
str_result;
        return $str_result;
    }

}
?>